The present invention relates to a portable electronic device, generally known as an "IC card", which contains an IC (Integrated circuit) chip having, for example, a non-volatile data memory and a control element such as a CPU, and, more particularly, to a system for controlling the data memory.
The development of a portable data-recording medium, the so-called "IC card", is a relatively recent event. This IC card contains an IC chip having a non-volatile data memory and a control element such as a CPU. The control element controls access to the data memory, thereby permitting pertinent data to be written into and to be read out from the data memory in accordance with a request fed thereinto via an external terminal device.
The data memory incorporated in the IC memory is divided into a plurality of areas each of which stores different items of data and is assigned a number known as an "area number". A logic access method is used to access the data memory by designating the number of any desired area of the data memory.
To perform the logic access method, the data memory is divided into two areas, i.e., a directory area and a user area. The user area is itself sub-divided into a plurality of areas for storing different items of data for various uses. The areas of the user area are defined by a plurality of region-defining data items stored in the directory area. Each area-defining data item comprises area number data representing the number of a user, area, head address data defining the position of the particular user area in the sub-divided user area, size data showing the size of the user area, and attribute data representing the use of the user area.
Hitherto, only one group of area-defining data items could be stored within an IC card. This did not matter previously, since at the time an IC card was limited in its range of uses. Today, however, there is general demand for an IC card which be used for a variety of purposes; for example, one which can be inserted in a cash dispenser (CD) terminal and thus used as a CD card, and which can also be inserted into a terminal installed in a hospital and used as a health insurance policy and medical record. When an IC card storing only one group of area-defining data items is to be used for such a variety of purposes, it is first necessary to:
(1) Assign area numbers identifying various uses to the user area; and PA0 (2) Determine, by means of a terminal, whether or not the number assigned to any user area which is to be accessed, identifies the desired use.
Even if both actions (1) and (2) are carried out, the following problems still remain. First, IC card systems A and B, which have been independently developed for different purposes, cannot exchange data. (It is very probable that systems A and B use the same user area.) Secondly, the security of the data stored in any user area cannot be ensured, since the data input from system A can be stolen or altered by an authorized party operating system B; that is, the IC card is not protected against such illegal transactions.